package db

const TableNameGameReward = TablePrefix + "game_reward"

type GameReward struct {
	BaseModel
	Rands  int64 `gorm:"column:rands;type:int(11);default:0;comment:随机数" json:"rands" form:"rands"`        // 随机数
	TypeID uint  `gorm:"column:type_id;type:int(11);default:0;comment:奖品类型id" json:"typeID" form:"typeID"` // 奖品类型id
	Num    int64 `gorm:"column:num;type:int(11);default:0;comment:奖品数量" json:"num" form:"num"`             // 奖品数量
}

func (*GameReward) TableName() string {
	return TableNameGameReward
}

type GameRewardHasOneType struct {
	GameReward
	Types Type `gorm:"foreignKey:ID;references:TypeID" json:"types"`
}
